package com.kayt.cyberBar.cuser.business.entity.po;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.persistence.*;

import org.codehaus.jackson.annotate.JsonBackReference;

/**
 * The persistent class for the b_cyber_base_task_report database table.
 * 
 */
@Entity
@Table(name="b_cyber_base_task_report")
@NamedQuery(name="BCyberBaseTaskReport.findAll", query="SELECT b FROM BCyberBaseTaskReport b")
public class BCyberBaseTaskReport implements Serializable {
	private static final long serialVersionUID = 1L;
	private Long id;
	private String code;
	private String createTime;
	private String cyberCode;
	private String deadLine;
	private String des;
	private String fromCode;
	private String fromName;
	private String name;
	private String remarks;
	private String replyCode;
	private String statusCode;
	private String toCode;
	private String toName;
	private String updateTime;
	
	private BCyberBaseTaskReply reply;
	private List<BCyberBaseTaskPic> picList = new ArrayList<>();
	private List<BCyberBaseTaskAttach> attachList = new ArrayList<>();

	public BCyberBaseTaskReport() {
	}


	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}


	public String getCode() {
		return this.code;
	}

	public void setCode(String code) {
		this.code = code;
	}


	@Column(name="CREATE_TIME")
	public String getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}


	@Column(name="CYBER_CODE")
	public String getCyberCode() {
		return this.cyberCode;
	}

	public void setCyberCode(String cyberCode) {
		this.cyberCode = cyberCode;
	}


	@Column(name="DEAD_LINE")
	public String getDeadLine() {
		return this.deadLine;
	}

	public void setDeadLine(String deadLine) {
		this.deadLine = deadLine;
	}


	public String getDes() {
		return this.des;
	}

	public void setDes(String des) {
		this.des = des;
	}


	@Column(name="FROM_CODE")
	public String getFromCode() {
		return this.fromCode;
	}

	public void setFromCode(String fromCode) {
		this.fromCode = fromCode;
	}


	@Column(name="FROM_NAME")
	public String getFromName() {
		return this.fromName;
	}

	public void setFromName(String fromName) {
		this.fromName = fromName;
	}


	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}


	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}


	@Column(name="REPLY_CODE")
	public String getReplyCode() {
		return this.replyCode;
	}

	public void setReplyCode(String replyCode) {
		this.replyCode = replyCode;
	}


	@Column(name="STATUS_CODE")
	public String getStatusCode() {
		return this.statusCode;
	}

	public void setStatusCode(String statusCode) {
		this.statusCode = statusCode;
	}


	@Column(name="TO_CODE")
	public String getToCode() {
		return this.toCode;
	}

	public void setToCode(String toCode) {
		this.toCode = toCode;
	}


	@Column(name="TO_NAME")
	public String getToName() {
		return this.toName;
	}

	public void setToName(String toName) {
		this.toName = toName;
	}


	@Column(name="UPDATE_TIME")
	public String getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}


	@OneToOne(targetEntity = BCyberBaseTaskReply.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	@JoinColumn(name="REPLY_CODE", referencedColumnName="CODE", nullable = false, insertable=false, updatable=false)
	@JsonBackReference
	public BCyberBaseTaskReply getReply() {
		return reply;
	}


	public void setReply(BCyberBaseTaskReply reply) {
		this.reply = reply;
	}


	@OneToMany(targetEntity = BCyberBaseTaskPic.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY, orphanRemoval = true, mappedBy = "report")
	public List<BCyberBaseTaskPic> getPicList() {
		return picList;
	}


	public void setPicList(List<BCyberBaseTaskPic> picList) {
		this.picList = picList;
	}


	@OneToMany(targetEntity = BCyberBaseTaskAttach.class, cascade = CascadeType.ALL, fetch = FetchType.LAZY, orphanRemoval = true, mappedBy = "report")
	public List<BCyberBaseTaskAttach> getAttachList() {
		return attachList;
	}


	public void setAttachList(List<BCyberBaseTaskAttach> attachList) {
		this.attachList = attachList;
	}
	

}